package com.jkl.zookeeperserver.Provider;


import com.jkl.Interface.ZookeeperServer;
import com.jkl.zookeeperserver.Zookeeper.ZookeeperClient;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@DubboService
public class ZookeeperServerProvider implements ZookeeperServer {
    private final ZookeeperClient zookeeperClient;

    @Autowired
    public ZookeeperServerProvider(ZookeeperClient zookeeperClient) {
        this.zookeeperClient = zookeeperClient;
    }
    @Override
    public boolean findPath(String path) throws Exception {
        return zookeeperClient.findPath(path);
    }
    @Override
    public String getPath() {
        return zookeeperClient.getPath();
    }
}
